<div class="role">

    <nz-collapseset>
        <nz-collapse [nzTitle]="panels.name" [nzActive]="panels.active" [nzDisabled]="panels.disabled">
            <form nz-form [nzLayout]="'inline'" >
                <div nz-form-item nz-col [nzSpan]="6">
                    <div nz-form-label nz-col [nzSm]="9" [nzXs]="6">
                        <label>角色名称</label>
                    </div>
                    <div nz-form-control>
                        <nz-input  [(ngModel)]="sysRoleBean.roleName" name="roleName">
                        </nz-input>
                    </div>
                </div>
                <!--<div nz-form-item nz-col [nzSpan]="6">-->
                    <!--<div nz-form-label nz-col [nzSm]="9" [nzXs]="6">-->
                        <!--<label>所属机构</label>-->
                    <!--</div>-->
                    <!--<div nz-form-control>-->
                        <!--<nz-select-->
                                <!--style="width: 150px;"-->
                                <!--nzAllowClear-->
                                <!--[nzPlaceHolder]="'请选择'"-->
                                <!--[(ngModel)]="sysRoleBean.roleTypeId"-->
                                <!--[nzShowSearch]="true" name="roleTypeId">-->
                            <!--<nz-option-->
                                    <!--*ngFor="let option of searchOptions"-->
                                    <!--[nzLabel]="option.roleTypeName"-->
                                    <!--[nzValue]="option.id"-->
                                    <!--[nzDisabled]="option.disabled">-->
                            <!--</nz-option>-->
                        <!--</nz-select>-->
                    <!--</div>-->
                <!--</div>-->
                <button nz-button [nzSize]="'large'" [nzType]="'primary'" (click)="query()">查询</button>
            </form>

        </nz-collapse>
    </nz-collapseset>
    <ul nz-menu [nzMode]="'horizontal'">
        <li  permission="SID00004" nz-menu-item (click)="add(title, content, footer)"><i class="anticon anticon-plus"></i>添加</li>
        <li permission="SID00005" nz-menu-item (click)="update(title, content, footer)"><i class="anticon anticon-copy"></i>修改</li>
        <li permission="SID00006" nz-menu-item (click)="delete()"><i class="anticon anticon-delete"></i>删除</li>
    </ul>
    <nz-table #nzTable [nzDataSource]="list" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="displayDataChange($event)">
        <thead nz-thead>
        <tr>
            <th nz-th [nzCheckbox]="true">
                <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate" (ngModelChange)="checkAll($event)">
                </label>
            </th>
            <th nz-th><span>角色名称</span></th>
            <th nz-th><span>角色描述</span></th>

        </tr>
        </thead>
        <tbody nz-tbody>
        <tr nz-tbody-tr *ngFor="let data of list">
            <td nz-td [nzCheckbox]="true">
                <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="refreshStatus($event)">
                </label>
            </td>
            <td nz-td>{{data.roleName}}</td>
            <td nz-td>{{data.roleDescribe}}</td>
        </tr>
        </tbody>
    </nz-table>

    <nz-pagination [nzPageIndex]="sysRoleBean.currentPage" nzShowTotal [nzTotal]="total" nzShowSizeChanger (nzPageSizeChange)="nzPageSizeChange($event)" (nzPageIndexChange)="nzPageIndexChange($event)" (nzPageIndexClickChange)="nzPageIndexClickChange($event)" [nzPageSize]="sysRoleBean.pageSize"></nz-pagination>

    <ng-template #title>
      <span>{{modelTitle}}</span>
      </ng-template>
      <ng-template #content>
        <role-add-page *ngIf="modal==0" [inValue]="totalList" (outPut)="addOutPut($event)"></role-add-page>
        <role-modify-page *ngIf="modal==1" [inValue]="updateData" (outPut)="addOutPut($event)"></role-modify-page>
      </ng-template>
      <ng-template #footer>
        <div>

        </div>
      </ng-template>
    </div>
